package com.lch.thread.juc;

import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

/**
 * @author: liuchenhui
 * @create: 2019-05-18 20:13
 **/
public class ConditionMain {
    public static void main(String[] args) {
        Lock lock = new ReentrantLock();
        final Condition condition = lock.newCondition();

        new Thread(new ConditionWait(lock, condition)).start();
        new Thread(new ConditionNotify(lock, condition)).start();
    }
}
